home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks96
/
RoasterJavaWAHTTPCGI.sit
/
Roaster-Java-WA-HTTP-CGI hack
/
cgi WA plugin
/
PluginLibrary.cp
< prev
next >
Wrap
Text File
|
1996-06-22
|
800b
|
35 lines
#include <Files.h>
#include "PluginLibrary.h"
// Stub to resolve the compiler-generated constructor references.
#ifndef __MWERKS__
// CW7 will not allow us to override this if #pragma pointers_in_D0 is turned on (which
// it needs to be). Therefore caller must take care not to call operator new since there
// is no safety net.
void* operator new(size_t)
{
DebugMsg("Error - naked operator new called.");
return nil;
}
#endif //__MWERKS__
void* operator new(size_t /*n*/, void *p) { return p; }
void operator delete(void* /*p*/) {}
extern "C" void DebugMsg(const char* msg)
{
char buf[256];
int msgLen = 0;
while (msgLen < 255 && msg[msgLen] != 0)
msgLen++;
buf[0] = msgLen;
while (--msgLen >= 0)
buf[msgLen+1] = msg[msgLen];
DebugStr((ConstStr255Param)buf);
} // DebugMsg